//*** Guidance generated code ***//
using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using System.Linq;
using System.Web.Security;

using ProjectBase.Core;

using Survey.Common.Data.Services;
using Survey.Entity.Services;

namespace Survey.Common.Business.Services
{
    /// <summary>
    ///     All Business checks for 'User' on CRUD operations
    ///     are nested and encapsulated in this UserFacade
    /// </summary>
    //[ContractClass(typeof(Diagnostics.UserFacade))]
    public interface IUserFacade : IBaseFacade<User, int, UserFilter>
    {
        /// <summary>
        ///     Clears all cached Users; and force their reload from data storage.
        /// </summary>
        void Clear();

        User CreateNew(string login);
        User GetByLogin(string login);

        MembershipCreateStatus CreateMember(Member member);//string userName, string password, string email);
        bool ValidateUser(string userName, string password);
        bool UpdateMember(Member member);//string userName, string password, string newPassword);
        MembershipProvider MProvider { set; }

        // IoC
        IUserDao Dao { set; }
    }
}